In HEVC, a merge mode for Inter-picture prediction is introduced. A merge candidate list of candidate motion parameters from neighboring blocks is constructed. Then an index is signaled which identifies the candidates to be used. Merge mode also allows for temporal prediction by including into the list a candidate obtained from previously coded pictures. In HEVC, the merge candidates list is constructed based on: up to four spatial merge candidates that are derived from five spatial neighboring blocks shown in FIG. 1; one temporal merge candidate derived from two temporal co-located blocks; and additional merge candidates including combined bi-predictive candidates and zero motion vector candidates.
In HEVC, a skip mode is used to indicate for a block that the motion data is inferred instead of explicitly signaled ad that the prediction residual is zero, i.e. no transform coefficients are transmitted. In HEVC, at the beginning of each CU in an inter-picture prediction slice, a slip _flag is signaled that implies that the CU only contains one PU (2N×2N), that the merge mode is used to derive the motion data, and that no residual data is present in the bitstream.
In Joint Exploration Model 7 (JEM 7) which is the test model software study by Joint Video Exploration Team (JVET), some new merge candidates are introduced. The sub-CU modes are enabled as additional merge candidates and there is no additional syntax element required to signal the modes. Two additional merge candidates are added to merge candidates list of each CU to represent the ATMVP mode and STMVP mode. Up to seven merge candidates are used, if the sequence parameter set indicates that ATMVP and STMVP are enabled. The encoding logic of the additional merge candidates is the same as for the merge candidates in the HEVC, which means, for each CU in P or B slice, two more RD checks are needed for the two additional merge candidates. In JEM, the order of the inserted merge candidates is A, B, C, D, ATMVP, STMVP, E (when the merge candidates in the list are less than 6), TMVP, combined bi-predictive candidates and zero motion vector candidates.
In the JEM, all bins of merge index are context coded by CABAC. While in HEVC, only the first bin is context coded and the remaining bins are context by-pass coded. In the JEM, the maximum number of merge candidates are 7.
Another scheme searches the candidate motion vectors from previously coded blocks, with a step size of 8×8 block. It defines the nearest spatial neighbors, i.e., immediate top row, left column, and top-right corner, as category 1. The outer regions (maximum three 8×8 blocks away from the current block boundary) and the collocated blocks in the previously coded frame are classified as category 2. The neighboring blocks that are predicted from different reference frames or are intra coded are pruned from the list. The remaining reference blocks are then each assigned a weight. The weight is related to the distance to the current block. FIG. 2 illustrate an example of the merge candidates list construction in this scheme.
In JVET-J0059, more spatial positions are checked as shown in FIG. 3. The extended spatial positions from 6 to 27 are checked according to their numerical order after the temporal candidate. In order to save the MV line buffer, all the spatial candidates are restricted within two CTU lines. That is, the spatial candidates beyond the CTU line above the current CTU line are excluded. The grid of these extra spatial merge candidate is based on the block size. Thus every candidate is an offset of width away from the next one in horizontal direction, and an offset of height away from the next one in vertical direction. Width and height are the current block size.
The number of candidates within the merge candidate list is controlled by NumMrgCands. In HEVC, NumMrgCands=5. In JEM, the NumMrgCands is added by 2 when ATMVP is turned on. In this proposed method, the NumMrgCands is added by 6, so the NumMrgCands equals to 11 when ATMVP is off and 13 when ATMVP is on.
The whole process of adding candidates will stop as soon as the number of candidates reaches NumMrgCands during the merge candidate list construction process. The redundancy check is done for all the merge candidates except the generated ones. That is, only unique motion candidate from spatial positions, ATMVP, and temporal candidate, can be included the merge candidate list. The merge candidate list is constructed by adding the spatial positions from position 1 to 5, ATMVP candidates, and temporal candidate, which is the same as in current JEM (including redundancy check), and adding the extended spatial positions from position 6 to 27 (including redundancy check).